package com.ap.generator.messageheader;

import static com.ap.datagen.core.GeneratorHelper.fixedValueGenerator;
import static com.ap.datagen.core.GeneratorHelper.randomGeneratorFromEnum;
import static com.ap.datagen.core.Nullable.nullable;
import static com.ap.datagen.date.JodaLocalDateTimeGeneratorBuilder.jodaLocalDateTimeGeneratorBuilder;
import static com.ap.datagen.lang.StringRandomGeneratorBuilder.stringRandomGeneratorBuilder;

import com.ap.core.cxf.jaxb.managepayment.AbstractRetrieveRTPMsgHdrTypeGeneratorBuilder;
import com.ap.core.cxf.jaxb.managepayment.RetrieveRTPMessageType;

/**
 *
 */
public class RetrieveRTPMsgHdrTypeGeneratorBuilder extends AbstractRetrieveRTPMsgHdrTypeGeneratorBuilder{
    @Override
    public void setupDefaults() {
        this.msgIdGenerator = nullable(stringRandomGeneratorBuilder().length(16).build());
        this.msgTimestampGenerator = nullable(jodaLocalDateTimeGeneratorBuilder().build());
        this.msgTypeGenerator = nullable(randomGeneratorFromEnum((RetrieveRTPMessageType.RETRIEVERTP)));
    }

    public static RetrieveRTPMsgHdrTypeGeneratorBuilder msgHdrTypeGenerator() {
        return new RetrieveRTPMsgHdrTypeGeneratorBuilder();
    }

    public RetrieveRTPMsgHdrTypeGeneratorBuilder withMsgType(RetrieveRTPMessageType value) {
        this.msgTypeGenerator = nullable(fixedValueGenerator(value));
        return this;
    }
    
}
